package com.famdoc.Controller;

import com.famdoc.Pojo.dto.PatientSigningForm;
import com.famdoc.Pojo.dto.Result;
import com.famdoc.Service.SigningService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

@RestController
public class SigningController {

    @Autowired
    private SigningService signingService;

    /**
     * 个人签约
     * @param patientSigningForm
     * @return
     */
    @PostMapping("/signing")
    public Result Signing(@RequestBody PatientSigningForm patientSigningForm){
        return signingService.signing(patientSigningForm);
    }

    /**
     * 个人续约
     * @param patientSigningForm
     * @return
     */
    @PostMapping("/signed")
    public Result Signed(@RequestBody PatientSigningForm patientSigningForm){
        return signingService.signed(patientSigningForm);
    }
}
